package net.framework.smc.kotlin.demokotlin.dao

import net.framework.smc.kotlin.demokotlin.po.UserPo
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.JpaSpecificationExecutor
import org.springframework.data.jpa.repository.Query
import org.springframework.stereotype.Repository

/**
 *  @authore zyx
 *  @date 2018/7/5 15:59
 */
@Repository
interface UserRepository : JpaRepository<UserPo, Long>, JpaSpecificationExecutor<UserPo> {

    @Query("select t from UserPo t where t.userName = ?1 and t.delFlag=0 ")
    fun findByUserName(userName: String): UserPo
}